package com.tensquare.user.service;

import com.tensquare.user.dao.UserDao;
import com.tensquare.user.pojo.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@Service
@Transactional
public class UserService {

    @Autowired
    private UserDao userDao;

    public User findUserById(String uid){
        User user = this.userDao.selectById(uid);
        if (user == null){
            log.info("service查询用户，问题：{}",user.toString());
            return null;
        }
        return user;
    }
}
